
<style>
    #ribbon{
        display: none;
    }
</style>


    <div class="content-main">

        <div class="layui-fluid">

            <div class="layui-card">

                <div class="layui-card-header">

                    (单位：秒)

                </div>

                <div class="layui-card-body">

                    <form class="layui-form">

                        <div class="layui-form-item">

                            <input type="text"  id="try_see" name="try_see" autocomplete="off" placeholder="请输入试看时间【秒】" class="layui-input" value="{:rand(3,10)}">
                        </div>
                        <button type="button" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="sub">修改</button>


                    </form>

                </div>

            </div>

        </div>

    </div>





<script type="text/javascript" src="__CDN__/assets/libs/layui/layui.all.js"></script>
<script defer type="text/javascript">

    var forms = layui.form,$=layui.jquery;

    console.log($);
    $(document).ready(function(){

        $(".layui-btn").click(function(){
            $.ajax({
                url: "",
                type : "POST",
                dataType:'json',
                data:{

                    try_see:$("#try_see").val(),
                },
                cache: false,
                async:false,
                success: function (data) {
                    if (data.code == 0) {

                        layer.msg(data.msg,{time:1500},function(){

                            parent.layer.closeAll();

                            window.parent.location.reload();
                        });

                    }else{
                        layer.msg(data.msg);
                    }
                }
            });
        });


        // layer.alert(JSON.stringify(data.field), {

        //     title: '最终的提交信息'

        // });

        return false;
    });

</script>